/**
 * @Author DengJia
 * @Date 2021/8/18 21:20
 * @Description
 */

public class Cake {
    static int count = 0;
    private Cake() {

    }

    public static Cake get() {
        count++;
        return new Cake();
    }

    public static void main(String[] args) {
        Cake cake = Cake.get();
        System.out.println(Cake.count);

        for (int i = 0; i < 100; i++) {
            Cake.get();
        }
        System.out.println(Cake.count);
    }
}
